package com.vietnam.power.dao;

import java.util.Date;

import com.vietnam.power.persistence.UserInfo;

/**
 *
 * This interface is used to map the createdby, updatedby, createddate,updateddate
 * columns in the tables. All the objects (representing tables) that have the above
 * mentioned columns should implement this interface so that the values can be
 * populated by AuditInterceptor.
 *
 *
 */
public interface IAuditTable {

	/**
	 * Retrieve the person who has created the record in the table.
	 *
	 * @return - UserInfo - user information
	 */
	UserInfo getCreatedBy();

	/**
	 * This method is used to set the person who will create the record in the table.
	 *
	 * @param createdBy the new created by
	 * @return - UserInfo - user information
	 */
	void setCreatedBy(UserInfo createdBy);

	/**
	 * Retrieve the time when the record is created in the table.
	 *
	 * @return - UserInfo - user information
	 */
	Date getCreatedDate();

	/**
	 * This method is set the time when the record will be created in the table.
	 *
	 * @param createdDate the new created date
	 * @return - UserInfo - user information
	 */
	void setCreatedDate(Date createdDate);

}